24. Ratios

ANDK L2 72 Ratio HS-A

Android Developer Documentation:

When are ratio constraints useful?

In which of the following situations might it be useful to use ratios for constraining the size of a view or view group?

SOLUTION:
  • A view needs to have a certain aspect ratio to accommodate an image, no matter what the screen orientation or display size is.
  • You want to create a layout with squares that is adaptable but forces the squares to remain square.